﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace CallCppDll
{
    class Program
    {
        //[DllImport("test.dll", CharSet = CharSet.Auto, CallingConvention = CallingConvention.Cdecl)]
        [DllImport("test.dll")]
        public static extern List<byte> GetArray();
        static void Main(string[] args)
        {
            List<byte> bytes = GetArray();
            foreach (var b in bytes) {
                Console.WriteLine(b.ToString());
            }
            Console.ReadKey();
        }
    }
}
